class ReportsController < ApplicationController

# of visitors in a timeframe (repeat & new as 2 datapoints if possible)
# of volunteers in a timeframe
# of events each active volunteer has attended for a given timeframe

  before_filter :require_admin

  def visitors
    
  end

  def get_visitors
    @events = Event.find(:all, :conditions => ["starts_at >= ? AND ends_at <= ?", Date.parse(params[:starts_at]), Date.parse(params[:ends_at])])
    @visitors = []
    @events.each do |e|
      e.visitors.each do |v|
        @visitors.push(v)
      end
    end
  end

end
